<%@ page import="com.ws.lv.util.Res" %><%--
  Created by IntelliJ IDEA.
  User: Adminis
  Date: 2025/3/19
  Time: 11:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>顽石旅游网-搜索</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/home/css/common.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/home/css/search.css">
    <script src="${pageContext.request.contextPath}/home/js/jquery-3.3.1.js"></script>
    <style type="text/css">
        .topbar {
            position: relative
        }

        .hottel, .haslogin {
            position: absolute;
            top: 12px;
            right: 50px
        }

        .hottel p {
            cursor: pointer;
            font-weight: 700;
            float: left;
            width: 100px;
            border: 1px solid orange;
            text-align: center;
            height: 45px;
            line-height: 45px;
            margin-right: 10px
        }

        .hottel a {
            color: #666;
            text-decoration: none
        }

        .haslogin {
            top: 45px;
            right: 0
        }

        .haslogin p {
            font-weight: 700;
            float: left;
            margin-right: 30px;
            font-size: 18px
        }

        #fenye ul .active {
            background-color: #fc8989;
        }

        #fenye ul li a{
            display: inline-block;
            line-height: 40px;
            height: 40px;
            width: 40px;
        }

        #fenye ul li a:hover {
            background-color: #fc8989;
            text-decoration: none;
        }

        .company {
            background-color: whitesmoke;
            border-top: 3px solid rgba(15, 250, 231, 0.6);
        }

        .company .ctr {
            color: black;
            margin: 10px auto;
            font-size: 16px;
        }

        .ctrimg img {
            display: inline-block;
            width: 120px;
            height: 120px;
            vertical-align: middle;
            margin: auto 60px;
        }

        .tx {
            display: inline-block;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            float: left;
            margin-top: -20px;
            margin-right: 10px;
        }
    </style>
</head>
<body>
<!--引入头部-->
<header id="header">

    <div class="header_wrap">
        <div class="topbar">
            <div class="logo">
                <a href="/"><img src="${pageContext.request.contextPath}/home/images/logo.png" style="height: 60px;"
                                 alt=""></a>
            </div>
            <div class="search">
                <form action="${pageContext.request.contextPath}/homepage/toRoute_list" method="post">
                    <input name="route_name" type="text" placeholder="请输入路线名称"
                           class="search_input" autocomplete="off" value="${route_name}">
                    <button class="search-button" type="submit">搜索</button>
                </form>
            </div>

            <c:if test="${u!=null}">
                <div class="haslogin">
                    <p><a href="${pageContext.request.contextPath}/homepage/toMypage">
                        <img src="<%=Res.homeTxFileUrl%>${u.user_tx}" class="tx">
                        欢迎：${u.user_name}
                    </a>
                    </p>
                    <p><a href="${pageContext.request.contextPath}/user/outLogin">退出登录</a></p>
                </div>
            </c:if>
            <c:if test="${u==null}">
                <div class="hottel">
                    <a href="${pageContext.request.contextPath}/homepage/toHomeLogin"><p>登录</p></a>
                    <a href="${pageContext.request.contextPath}/homepage/toRegister"><p>注册</p></a>
                </div>
            </c:if>

        </div>
    </div>
</header>
<div class="page_one">
    <div class="contant">
        <div class="crumbs">
            <img src="${pageContext.request.contextPath}/home/images/search.png" alt="">
            <p><a href="${pageContext.request.contextPath}/homepage/toHomePage">首页</a>><span>搜索结果</span></p>
        </div>
        <div class="xinxi clearfix">
            <div class="left">
                <div class="header">
                    <span>商品信息</span>
                    <span class="jg">价格</span>
                </div>
                <ul>
                    <c:forEach items="${pageInfo.list}" var="route">
                        <li>
                            <div class="img"><img src="<%=Res.mainFileUrl%>${route.routh_mainImage}" width="299"
                                                  height="169"></div>
                            <div class="text1">
                                <p>${route.route_name}</p>
                                <br/>
                                <p>1-2月出发，网付立享￥1099/2人起！爆款位置有限，抢完即止！</p>
                            </div>
                            <div class="price">
                                <p class="price_num">
                                    <span>&yen;</span>
                                    <span>${route.route_price}</span>
                                    <span>起</span>
                                </p>
                                <p>
                                    <a href="${pageContext.request.contextPath}/homepage/toRoute_detail?route_id=${route.route_id}">查看详情</a>
                                </p>
                            </div>
                        </li>
                    </c:forEach>
                </ul>

                <%--前五后四--%>

                <c:if test="${pageInfo.pages>=10}">
                    <c:set var="begin" value="1"></c:set>
                    <c:set var="end" value="10"></c:set>
                    <c:if test="${pageInfo.pageNum>5}">
                        <c:set var="begin" value="${pageInfo.pageNum-4}"></c:set>
                        <c:set var="end" value="${pageInfo.pageNum+5}"></c:set>
                    </c:if>
                    <c:if test="${pageInfo.pageNum+5>pageInfo.pages}">
                        <c:set var="begin" value="${pageInfo.pages-9}"></c:set>
                        <c:set var="end" value="${pageInfo.pages}"></c:set>
                    </c:if>
                </c:if>

                <c:if test="${pageInfo.pages<10}">
                    <c:set var="begin" value="1"></c:set>
                    <c:set var="end" value="${pageInfo.pages}"></c:set>
                </c:if>

                <div class="page_num_inf">
                    <span style="color: black">当前第<b style="color: red">${pageInfo.pageNum}</b>页 共<b
                            style="color: red">${pageInfo.pages}</b>页 共<b style="color: red">${pageInfo.total}</b>条数据</span>
                </div>
                <div class="pageNum" id="fenye">
                    <ul>
                        <li>
                            <a href="${pageContext.request.contextPath}/homepage/toRoute_list?currentPage=1&route_name=${route_name}">首页</a>
                        </li>
                        <li>
                            <a href="${pageContext.request.contextPath}/homepage/toRoute_list?currentPage=${pageInfo.prePage}&route_name=${route_name}">&laquo;</a>
                        </li>

                        <c:forEach begin="${begin}" end="${end}" var="page">
                            <li ${page eq pageInfo.pageNum?"class='active'":''}>
                                <a href="${pageContext.request.contextPath}/homepage/toRoute_list?currentPage=${page}&route_name=${route_name}">${page}</a>
                            </li>
                        </c:forEach>

                        <li>
                            <a href="${pageContext.request.contextPath}/homepage/toRoute_list?currentPage=${pageInfo.nextPage}&route_name=${route_name}">&raquo;</a>
                        </li>

                        <li>
                            <a href="${pageContext.request.contextPath}/homepage/toRoute_list?currentPage=${pageInfo.pages}&route_name=${route_name}">尾页</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="right">
                <div class="top">
                    <span class="hot">热门推荐</span>
                </div>
                <ul>
                    <c:forEach items="${saveRoutes}" var="saveRoute">
                        <a href="${pageContext.request.contextPath}/homepage/toRoute_detail?route_id=${saveRoute.route_id}">
                            <li>
                                <div class="left"><img src="<%=Res.mainFileUrl%>${saveRoute.routh_mainImage}" alt=""></div>
                                <div class="right">
                                    <p>${saveRoute.route_name}</p>
                                    <p>网付价<span>&yen;<span>${saveRoute.route_price}</span>起</span>
                                    </p>
                                </div>
                            </li>
                        </a>
                    </c:forEach>

                </ul>
            </div>
        </div>
    </div>
</div>

<!--引入头部-->
<!-- 尾部 start-->
<footer id="footer">
    <div class="company">
        <div class="ctr">顽石教育有限公司 版权所有Copyright 2019-2020, All Rights Reserved 京ICP备12390</div>
        <div class="ctr">
            顽石教育客服中心设立在江苏南京及江苏宿迁，来电显示号码请查看： 顽石教育会员中心外呼电话号码汇总
        </div>
        <div class="ctr">
            北京顽石教育国际旅行社有限公司，旅行社业务经营许可证编号：L-BJ-CJ00144　　上海顽石教育国际旅行社有限公司，旅行社业务经营许可证编号：L-SH-CJ00107
        </div>
        <div class="ctr">
            Copyright © 2006-2025 南京顽石教育科技有限公司 lzc.ws.com | 营业执照 | ICP证：苏B2-20130006 |
            苏ICP备12009060号-4
            | 苏网食备A32000000032 | 石家庄旅游网
        </div>
        <div class="ctr">
            关于我们 顽石教育经过多年打拼 终于在石家庄市获得了一席之地 这代表着我们公司及团队的成长与付出
            我们一直以“专业、高效、创新” 作为团队的精神 多年来打压着外部及内部的乐色公司 一步步往上爬 终于在2025年本公司的项目上市
            获得多平台联合认可 全国服务热线：400-888-8888
        </div>
        <div class="ctr">
            感谢大家这么长时的陪伴 愿我们的努力 为每一位顾客带来一份快乐
        </div>
        <div class="ctrimg">
            <img src="${pageContext.request.contextPath}/home/images/kuaishou.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/douyin.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/xiaomi.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/huawei.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/jiangbei.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/jingcha.png" alt="">
        </div>
    </div>
</footer>
<!--导入布局js，共享header和footer-->
<script type="text/javascript" src="${pageContext.request.contextPath}/home/js/include.js"></script>
</body>

</html>